<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>org.freedesktop.PolicyKit1.AuthenticationAgent Interface</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="polkit Reference Manual">
<link rel="up" href="ref-dbus-api.html" title="Part II. D-Bus API Reference">
<link rel="prev" href="eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html" title="org.freedesktop.PolicyKit1.Authority Interface">
<link rel="next" href="ref-api.html" title="Part III. Client API Reference">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ref-dbus-api.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">polkit Reference Manual</th>
<td><a accesskey="n" href="ref-api.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#eggdbus-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#eggdbus-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="eggdbus-interface-org.freedesktop.PolicyKit1.AuthenticationAgent"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle">org.freedesktop.PolicyKit1.AuthenticationAgent Interface</span></h2>
<p>org.freedesktop.PolicyKit1.AuthenticationAgent Interface — Authentication Agent Interface</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Methods</h2>
<pre class="synopsis">
<a class="link" href="eggdbus-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.html#eggdbus-method-org.freedesktop.PolicyKit1.AuthenticationAgent.BeginAuthentication" title="BeginAuthentication ()">BeginAuthentication</a>  (IN  String               action_id,
                      IN  String               message,
                      IN  String               icon_name,
                      IN  Dict&lt;String,String&gt;  details,
                      IN  String               cookie,
                      IN  Array&lt;<a class="link" href="eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html#eggdbus-struct-Identity" title="The Identity Structure">Identity</a>&gt;      identities)
<a class="link" href="eggdbus-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.html#eggdbus-method-org.freedesktop.PolicyKit1.AuthenticationAgent.CancelAuthentication" title="CancelAuthentication ()">CancelAuthentication</a> (IN  String               cookie)
    </pre>
</div>
<div class="refsect1">
<a name="eggdbus-if-description-org.freedesktop.PolicyKit1.AuthenticationAgent"></a><h2>Description</h2>
<p>
</p>
<p>This D-Bus interface is used for communication between the system-wide PolicyKit daemon and one or more authentication agents each running in a user session.</p>
<p>An authentication agent must implement this interface and register (passing the object path of the object implementing the interface) using the <a class="link" href="eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html#eggdbus-method-org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent" title="RegisterAuthenticationAgent ()">RegisterAuthenticationAgent()</a> and <a class="link" href="eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html#eggdbus-method-org.freedesktop.PolicyKit1.Authority.UnregisterAuthenticationAgent" title="UnregisterAuthenticationAgent ()">UnregisterAuthenticationAgent()</a> methods on the <a class="link" href="eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html" title="org.freedesktop.PolicyKit1.Authority Interface">org.freedesktop.PolicyKit1.Authority</a> interface of the PolicyKit daemon.</p>
<p>
      </p>
</div>
<div class="refsect1">
<a name="eggdbus-if-method-details-org.freedesktop.PolicyKit1.AuthenticationAgent"></a><h2>Method Details</h2>
<div class="refsect2">
<a name="eggdbus-method-org.freedesktop.PolicyKit1.AuthenticationAgent.BeginAuthentication"></a><h3>BeginAuthentication ()</h3>
<pre class="programlisting">
BeginAuthentication (IN  String               action_id,
                     IN  String               message,
                     IN  String               icon_name,
                     IN  Dict&lt;String,String&gt;  details,
                     IN  String               cookie,
                     IN  Array&lt;<a class="link" href="eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html#eggdbus-struct-Identity" title="The Identity Structure">Identity</a>&gt;      identities)
    </pre>
<p>
      </p>
<p>
        Called by the PolicyKit daemon when the authentication agent
        needs the user to authenticate as one of the identities in
        <em class="parameter"><code>identities</code></em> for the action with the
        identifier <em class="parameter"><code>action_id</code></em>.</p>
<p>Upon
        succesful authentication, the authentication agent must invoke
        the <a class="link" href="eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html#eggdbus-method-org.freedesktop.PolicyKit1.Authority.AuthenticationAgentResponse" title="AuthenticationAgentResponse ()">AuthenticationAgentResponse()</a>
        method on the <a class="link" href="eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html" title="org.freedesktop.PolicyKit1.Authority Interface">org.freedesktop.PolicyKit1.Authority</a>
        interface of the PolicyKit daemon before returning.
      </p>
<p>
      </p>
<p>
        The authentication agent should not return until after authentication is complete.
        If the user dismisses the authentication dialog, the authentication agent should return the <a class="link" href="eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html#eggdbus-constant-Error.org.freedesktop.PolicyKit1.Error.Cancelled">org.freedesktop.PolicyKit1.Error.Cancelled</a> error.
      </p>
<p>
    </p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><code class="literal">IN  String <em class="parameter"><code>action_id</code></em></code>:</span></p></td>
<td><p>
The identifier for the action that the user is authentication for.
      </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">IN  String <em class="parameter"><code>message</code></em></code>:</span></p></td>
<td><p>
The message to display to the user. This is translated into the locale passed when registering the authentication agent using <a class="link" href="eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html#eggdbus-method-org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent" title="RegisterAuthenticationAgent ()">RegisterAuthenticationAgent()</a>.
      </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">IN  String <em class="parameter"><code>icon_name</code></em></code>:</span></p></td>
<td><p>
The themed icon describing the action or the empty string if no icon is set.
      </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">IN  Dict&lt;String,String&gt; <em class="parameter"><code>details</code></em></code>:</span></p></td>
<td><p>
        Details about the authentication request. This is a dictionary
        of key/value pairs where both key and value are strings.
        Known key/value-pairs include
        <code class="literal">polkit.caller-pid</code> (the process id of the
        mechanism making the authorization check) and
        <code class="literal">polkit.subject-pid</code> (the process id of the
        subject the check is for).
      </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">IN  String <em class="parameter"><code>cookie</code></em></code>:</span></p></td>
<td><p>
A cookie identifying the authentication request.
      </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">IN  Array&lt;<a class="link" href="eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html#eggdbus-struct-Identity" title="The Identity Structure">Identity</a>&gt; <em class="parameter"><code>identities</code></em></code>:</span></p></td>
<td><p>
An array of <a class="link" href="eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html#eggdbus-struct-Identity" title="The Identity Structure">Identity</a> structs that the user can use for authentication.
      </p></td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="eggdbus-method-org.freedesktop.PolicyKit1.AuthenticationAgent.CancelAuthentication"></a><h3>CancelAuthentication ()</h3>
<pre class="programlisting">
CancelAuthentication (IN  String  cookie)
    </pre>
<p>
Called by the PolicyKit daemon if the authentication agent needs to cancel an authentication dialog.
    </p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="literal">IN  String <em class="parameter"><code>cookie</code></em></code>:</span></p></td>
<td><p>
The cookie identifying the authentication request.
      </p></td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>